#ifndef STOCK10_H_
#define STOCK10_H_
#include<string>
class Stock
{
    private:
        std::string company; // 公司名称
        long shares;  // 股票数
        double share_val; // 每股价格
        double total_val; // 股票总金额
        void set_tot(){total_val = shares*share_val;}
    public:
        Stock();
        Stock(const std::string &co,long n = 0,double pr = 0.0);
        ~Stock();
        void buy(long num,double price);
        void sell(long num,double price);
        void update(double price);
        void show();
};
#endif
